package VISTA;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JPanel;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

import CONTROLADOR.ControladorMenuPrincipal;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class MenuPrincipal extends javax.swing.JFrame {
	private JPanel pnlMenuPrincipal;
	private JPanel pnlConfiguracion;
	private JButton btnIngredientes;
	private JButton btnProductos;
	private JButton btnListados;
	private JButton btnGenerarOrdenes;
	private JButton btnCategorias;
	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				MenuPrincipal inst = new MenuPrincipal();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public MenuPrincipal() {
		super("Menu Principal");
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				pnlMenuPrincipal = new JPanel();
				getContentPane().add(pnlMenuPrincipal, BorderLayout.CENTER);
				pnlMenuPrincipal.setLayout(null);
				pnlMenuPrincipal.setBackground(new java.awt.Color(255,255,255));
				pnlMenuPrincipal.setLayout(null);
				pnlMenuPrincipal.setPreferredSize(new java.awt.Dimension(763, 353));
				{
					pnlConfiguracion = new JPanel();
					pnlMenuPrincipal.add(pnlConfiguracion);
					pnlConfiguracion.setLayout(null);
					pnlConfiguracion.setBounds(21, 25, 710, 137);
					pnlConfiguracion.setBackground(new java.awt.Color(228,196,116));
					pnlConfiguracion.setBorder(BorderFactory.createTitledBorder("Configuraciones"));
					{
						btnIngredientes = new JButton();
						pnlConfiguracion.add(btnIngredientes);
						btnIngredientes.setText("Ingredientes");
						btnIngredientes.setBounds(77, 32, 205, 34);
						btnIngredientes.setActionCommand("Ingredientes");
					}
					{
						btnProductos = new JButton();
						pnlConfiguracion.add(btnProductos);
						btnProductos.setText("Productos");
						btnProductos.setBounds(410, 32, 205, 34);
						btnProductos.setActionCommand("Productos");
					}
					{
						btnCategorias = new JButton();
						pnlConfiguracion.add(btnCategorias);
						btnCategorias.setText("Categorias");
						btnCategorias.setBounds(250, 77, 205, 34);
						btnCategorias.setActionCommand("Categorias");
					}
				}
				{
					btnGenerarOrdenes = new JButton();
					pnlMenuPrincipal.add(btnGenerarOrdenes);
					btnGenerarOrdenes.setText("Generar Ordenes");
					btnGenerarOrdenes.setBounds(21, 193, 710, 58);
					btnGenerarOrdenes.setActionCommand("Ordenes");
				}
				{
					btnListados = new JButton();
					pnlMenuPrincipal.add(btnListados);
					btnListados.setText("Listados");
					btnListados.setBounds(21, 273, 710, 58);
					btnListados.setActionCommand("Listados");
				}
			}
			pack();
			this.setSize(765, 388);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	public void addListener(ActionListener actionListener){
		this.btnIngredientes.addActionListener(actionListener);
		this.btnProductos.addActionListener(actionListener);
		this.btnCategorias.addActionListener(actionListener);
		this.btnGenerarOrdenes.addActionListener(actionListener);
		this.btnListados.addActionListener(actionListener);
	}
		
}
